<?php
//管理员数据库的遍历展示
  include_once("./com.php");
  $rem="select * from admin";
  $ser=mysql_query($rem);
  while($res=mysql_fetch_assoc($ser)){
    $ree[]=$res;
  };

?>



<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员</title>
<base target="_self">
<link rel="stylesheet" type="text/css" href="skin/css/base.css" />
<link rel="stylesheet" type="text/css" href="skin/css/main.css" />
</head>
<body leftmargin="8" topmargin='8'>
<table width="98%" align="center" border="0" cellpadding="3" cellspacing="1" bgcolor="#CBD8AC" style="margin-bottom:8px;margin-top:8px;">
  <tr>
    <td background="skin/images/frame/wbg.gif" bgcolor="#EEF4EA" class='title' colspan="2"><span><img src='skin/images/frame/arr3.gif' style='margin-right:10px;'>管理员</span></td>
  </tr>
   <tr>
    <td background="skin/images/frame/wbg.gif" bgcolor="#EEF4EA" class='title' colspan="2">
      <span style='margin-left:1020px;'><a href="adm1.php">添加管理员</a></span></td>
  </tr>
  <tr bgcolor="#FFFFFF">
    	 <td colspan="2">
    	 	<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#CFCFCF" align="center" style="margin-top:8px">
    	 	<tr align="center" bgcolor="#FBFCE2" height="25">
    	 		<th>管理员ID</th>
    	 		<th>用户名</th>
    	 		<th>角色</th>
    	 		<th>联系方式</th>
    	 		<th>最后登录时间</th>
          <th>操作</th>
    	 	</tr>
        <?php  foreach ($ree as $key=>$value) { ?>
          
    	 		<tr align='center' bgcolor="#FFFFFF" height="26" align="center" onMouseMove="javascript:this.bgColor='#FCFDEE';" onMouseOut="javascript:this.bgColor='#FFFFFF';">
            <td width="10%"><?= $value['aid']?></td>
          <td width="20%"><?= $value['aname']?></td>
          <td width="20%"> 
            <?php if($value['atype']==0){?>
                  超级管理员
            <?php }elseif($value['atype']==1){?>
                  一级管理员
            <?php }elseif($value['atype']==2){?>
                  二级管理员
            <?php }elseif($value['atype']==3){?>
                  三级管理员
              <?php }?>     
            </td>      
          <td width="10%"><?= $value['phone']?></td>
          <td width="20%"><?= $value['time']?></td>
          <td width="10%">
         <a href="adm2_edit.php?aid=<?= $value['aid'] ?>&type=<?= $value['atype'] ?>"><img src='./skin/images/frame/trun.gif' title="编辑" alt="编辑" onClick="QuickEdit(179, event, this);" style='cursor:pointer' border='0' width='16' height='16' /></a>        
         <a href="adm3_del.php?aid=<?= $value['aid'] ?>"><img src='./skin/images/frame/gtk-del.png' title="删除" alt="删除" onClick="editArc(179);" style='cursor:pointer' border='0' width='16' height='16' /></a>
          </td>
        </tr>	
      <?php  }?>
    	 	</table>
		</td>
	</tr>
  </tr>
</table>
</body>
</html>
